﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Listing.aspx.cs" Inherits="ZLDC.Estate.PM.Listing" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>笋盘推荐</title>
    <link href="../css/main.css" rel="stylesheet" type="text/css" />

    <script src="../js/jquery/jquery-1.3.2.min.js" type="text/javascript"></script>

    <script type="text/javascript" src="../js/LexunJS.js"></script>

    <script type="text/javascript">
        $(document).ready(function() {
            var id = LexunJS.GetQueryString("hid"); // 楼盘ID            
            document.getElementById("hid").value = id;
        });
        //笋盘查询
        function ReCommendHousing() {

            var id = document.getElementById("hid").value;
            var content = document.getElementById("txtContent").value;
            if (LexunJS.Trim(content) == "") {
                alert('请输入推荐理由！');
                return false;
            }
            $.ajax({
                type: 'POST',
                url: '../Handler/HandlerHousing.ashx',
                data: 'act=InsertHousingEveryDay&housingid=' + id + '&content=' + content,
                timeout: '10000',
                error: function() {
                    alert("推荐失败！");
                }, success: function(outmsg) {
                    alert(outmsg);
                    document.getElementById("hid").value = "";
                    if (outmsg != "推荐失败")
                    window.close();
                }
            });
        }
    </script>

</head>
<body>
    <form id="form1" runat="server">
   
        <div id="tabcontent" style="margin-left: 20px; margin-right: 20px;">
            <table border="0" align="center" bgcolor="#CCCCCC" cellpadding="0" cellspacing="0">
                <tr>
                    <td bgcolor="#F7F7F7" align="right" style="width: 20%">
                        推荐理由：
                    </td>
                    <td bgcolor="#F7F7F7" style="width: 60%">
                        <textarea id="txtContent" name="txtContent" style="height: 80px;"></textarea>
                    </td>
                </tr>
            </table>
        </div>
        <div id="tabbottom" style="text-align: right;">
            <input id="btnSave" type="button" value="确定" class="button_bak"  onclick="return ReCommendHousing()"/>
            <input id="btnClose" type="button" value="关闭" class="button_bak"  onclick="window.close();"/>

            
        <%--    <img alt="" src="../images/bot2.gif" onclick="return ReCommendHousing()" />
            <img id="img2" src="../images/bot11.gif" onclick="window.close();" />--%>
        </div>
   
    <input id="hid" type="hidden" />
    </form>
</body>
</html>
